﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Configuration;
using ClsManager;

namespace ClsAnalysis
{
    public static class ClsButtonAction // TODO: 紀錄動作 更改成WCF服務
    {
        public static void SendBtnInfo(object sender, string frmName, string userName)
        {
            //string location = sender.ToString().Split(',')[0];
            //string location = frmName;
            //string btnFuntion = ((Button)sender).Text;

            
            ////string strConn = login.strconn;
            //string strConn = "Data Source=.; Initial Catalog=test; Integrated Security=True"; // TODO: 紀錄動作(2) 改紀錄的TABLE
            //using (SqlConnection conn = new SqlConnection(strConn))
            //{
            //    string strCmd = "  INSERT INTO BtnInformation (Location,BtnFunction) VALUES (@Location,@BtnFunction)";
            //    using (SqlCommand cmd = new SqlCommand(strCmd, conn))
            //    {
            //        conn.Open();
            //        cmd.Parameters.AddWithValue("@Location", location);
            //        cmd.Parameters.AddWithValue("@BtnFunction", btnFuntion);
            //        cmd.ExecuteNonQuery();
            //        conn.Close();
            //    }
            //}
        }
    }
}
